package com.wl.java_spring_boot01.modules.test.service;

import com.github.pagehelper.PageInfo;
import com.wl.java_spring_boot01.modules.common.vo.Result;
import com.wl.java_spring_boot01.modules.common.vo.SearchVo;
import com.wl.java_spring_boot01.modules.test.entity.City;

import java.util.List;

public interface CityService {
    //通过id查城市
    List<City> getCitiesByCountryId(int countryId);
    //通过searchVo和id的分页查询
    PageInfo<City> getCitiesBySearchVo(int countryId,SearchVo searchVo);
    //通过searchVo查城市--脚本的多条件查询
    PageInfo<City> getCitiesBySearchVo(SearchVo searchVo);

    //增加
    Result<City> insertCity(City city);

    //修改
    Result<City> updateCity(City city);

    //删除
    Result<City> deleteCity(int cityId);
}
